import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
  base: '/',
  title: "wiki",
  lang: 'zh-CN',
  description: "A VitePress Site",
  lastUpdated: true,
  themeConfig: {
    i18nRouting: true,
    outlineTitle: "目录",
    lastUpdated: {
      text: 'Updated at',
      formatOptions: {
        dateStyle: 'full',
        timeStyle: 'medium'
      }
    },
    footer: {
      message: 'Released under the MIT License.',
      copyright: 'Copyright © 2019-present Evan You'
    },
    search: {
      provider: 'local'
    },
    // https://vitepress.dev/reference/default-theme-config
    nav: [
      { text: 'Home', link: '/' },
      { text: 'Examples', link: '/markdown-examples' },
      {text: "python", link: "/python/", activeMatch: '^/python/'},
      {text: "c/c++",link: "/c_cpp/c/", activeMatch: "^/c_cpp/"},
      {text: "龙芯", link: "/loongson/instruct", activeMatch: "^/loongson/"}
    ],
    sidebar: {
      "/loongson/": [
        {text: "龙芯", link: "/loongson/"},
        {text: "汇编指令", link: "/loongson/instruct"}
      ],
      "/c_cpp/": [
        {text: "c", link: "/c_cpp/c/"},
        {text: "c++", link: "/c_cpp/cpp/", collapsed: false, items: [
          {text: "qt", collapsed: true, items: [
            {text: "QT - 参考", link: "/c_cpp/cpp/qt/"}
          ]}
        ]},
        {text: "库",collapsed: true, link: "/c_cpp/libs/"},
        {text: "gn", collapsed: true, items: [
          {text: "gn - 简介", link: '/c_cpp/build_tools/gn/'}
        ]},
        {text: "cmake",collapsed: true, items: [
          {text: "cmake - 简介", link: '/c_cpp/build_tools/cmake/'}
        ]}
      ],
      "/python/": [
        {text: "python", link: "/python/"},
        {text: "参考", link: "/python/reference"}
      ],
      "/markdown-examples": [
      {
        text: 'Examples',
        items: [
          { text: 'Markdown Examples', link: '/markdown-examples' },
          { text: 'Runtime API Examples', link: '/api-examples' }
        ]
      }
    ]},

    socialLinks: [
      { icon: 'github', link: 'https://github.com/vuejs/vitepress' }
    ]
  }
})
